spr = argument0;    // sprite contain 0-9
position_x = argument1; // a list contain x position for showing score
position_y = argument2; // y position for showing score

num_len = string_length(string(gb_current_level_score));
digit[0] = string_char_at(string(gb_current_level_score),1);
{
    if (num_len >=2)
        digit[1] = string_char_at(string(gb_current_level_score),2);
    else
        digit[1] = 10;
}
{
    if (num_len >= 3)
        digit[2] = string_char_at(string(gb_current_level_score),3);
    else
        digit[2] = 10;
}
{
    if (num_len >= 4)
        digit[3] = string_char_at(string(gb_current_level_score),4);
    else
        digit[3] = 10;
}
{
    if (num_len >= 5)
        digit[4] = string_char_at(string(gb_current_level_score),5);
    else
        digit[4] = 10;
}
{
    if (num_len >= 6)
        digit[5]= string_char_at(string(gb_current_level_score),6);
    else
        digit[5] = 10;
}
{
    if (num_len >= 7)
        digit[6] = string_char_at(string(gb_current_level_score),7);
    else
        digit[6] = 10;
}
{
    if (num_len >= 8)
        digit[7] = string_char_at(string(gb_current_level_score),8)
    else
        digit[7] = 10
}
{
    if (num_len >= 9)
        digit[8] = string_char_at(string(gb_current_level_score),9);
    else
        digit[8] = 10;
}
{
    if (num_len >= 10)
        digit[9] = string_char_at(string(gb_current_level_score),10);
    else
        digit[9] = 10;
}

for (i=0;i<num_len;i+=1){
    draw_sprite(spr,real(digit[i]),ds_list_find_value(position_x,10-num_len+i),position_y);
}
/*
for (i=0;i<10;i+=1){
    draw_sprite(spr_num,real(digit[i]),ds_list_find_value(n_x,i),n_y);
}
*/
